//
// Created by 吴锐 on 2022/3/2.
//

#include "iostream"
#include "string"
#include "set"

using namespace std;

class Person {
public:
    string m_Name;
    int m_Age;

    Person(string name, int age){
        this->m_Name = name;
        this->m_Age = age;
    }
};

void test01(){
    set<Person> s;

    Person p1("刘备", 34);
    Person p2("关羽", 34);
    Person p3("张飞", 34);
    Person p4("赵云", 34);

    s.insert(p1);
    s.insert(p2);
    s.insert(p3);
    s.insert(p4);

    for(set<Person>::iterator it = s.begin() ;  it != s.end() ; it++){
        cout << "姓名: " << (*it).m_Name << " 年龄: " << (*it).m_Age << endl;
    }
}

int main(){

    return 0;
}